<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"  lang="en">
<head>
    <meta charset="UTF-8">
    <title>列表页</title>
    <style>
        table,tr,td{
            margin: 0 auto;
            width:800px;
        }

        table,tr,td{
            border: 1px solid seagreen;
            border-collapse: collapse;
        }

    </style>
</head>
<body>
<form action="#" th:action="@{/tPerson/list}" method="post">
    <table>
        <tr >
            <td>姓名</td>
            <td>
                <input type="text" name="name" th:value="${tPerson?.name}" size="20" /></td>
            <td>身份证号</td>
            <td>
                <input type="text" name="age" th:value="${tPerson?.IDCard}" size="18" />
                <input type="submit" value="查询" />
            </td>
        </tr>
    </table>

</form>
<table>
    <caption>人员-基本信息表</caption>
    <tr>
        <td colspan="8"><a th:href="@{/tPerson/input}" th:text="添加"></a></td>
    </tr>
    <tr>
        <td>序号</td>
        <td>姓名</td>
        <td>性别</td>
        <td>出生日期</td>
        <td>身份证号码</td>
        <td>操作</td>
    </tr>
    <!--
        <c:forEach var="user" items="${userList}" varStatus="iterStat">

        </c:forEach>
    -->
    <tr th:each="tPerson,iterStat: ${tPersonList}">
        <td th:text="${iterStat.count}"></td>
        <td th:text="${tPerson.name}"></td>
        <td th:text="${tPerson.sex}"></td>
        <td th:text="${tPerson.birthday}"></td>
        <td th:text="${tPerson.IDCard}"></td>
        <td>
            <a href="input.html" th:href="@{/tPerson/input(personID=${tPerson.personID})}" th:text="修改"></a>
            <a href="list.html" th:href="@{/tPerson/delete(personID=${tPerson.personID})}" th:text="删除"></a>
        </td>
    </tr>
</table>
</body>
</html>